package com.lzj.store.mapper;

import com.lzj.store.entity.Order;
import com.lzj.store.entity.OrderItem;
import com.lzj.store.vo.OrderItemVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @autor:lzj
 * @date:2022/3/23
 */
public interface OrderMapper {
    /**
     * 插入订单数据
     * @param order 订单数据
     * @return  受影响的行数
     */
    Integer insertOrder(Order order);

    /**
     * 插入订单项数据
     * @param orderItem 订单项数据
     * @return  受影响的行数
     */
    Integer insertOrderItem(OrderItem orderItem);

    List<OrderItemVo> selectVoOrderItem(Integer uid);

    List<Order> selectOrderByUid(Integer uid);
}
